class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table :categories do |t|
      t.integer :parent_id
      t.string  :title,:limit=>50
      t.string  :description
      t.integer :sort_order,:limit=>2
      t.integer :children_count,:default=>0,:limit=>2
      t.boolean :active,:default=>true

      t.timestamps
    end
  end

  def self.down
    drop_table :categories
  end
end
